/*
 * 文 件 名:  ServiceConstants.java
 * 版    权:  深圳埃思欧纳信息咨询有限公司版权所有. YYYY-YYYY,  All rights reserved
 * 描    述:  <描述>
 * 修 改 人:  Administrator
 * 修改时间:  2010-3-15
 * 跟踪单号:  <跟踪单号>
 * 修改单号:  <修改单号>
 * 修改内容:  <修改内容>
 */
package com.common.constants;

import java.util.HashMap;

import com.ue.data.DBManager;
import com.ue.data.DataSourceFactory;
import com.ue.data.DataTable;
import com.ue.data.IDataSource;
import com.ue.data.Sql;

/**
 * <业务操作常量类> <功能详细描述>
 * 
 * @author Eric.Zhang
 * @version [Aceona2.0, 2010-3-15]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class ServiceConstants
{
    /** 老系统地址 */
    public static String ACEONA10PATH = "";

    /** 新系统地址 */
    public static String ACEONA20PATH = "";

    /** 文件服务器地址 */
    public static String FILE_SERVER = "";

    /** 消息中心地址 */
    public static String IPC_URL = "";

    /** 动态地址 */
    public static String FEEDS_URL = "";

    /** 搜索接口地址 */
    public static String SEARCH_URL = "";
    
    /** 职位静态化接口地址 */
    public static String POSTINFOSTATIC_URL = "";

    /** 后台登陆地址 */
    public static String MANAGE_SYSTEM_LOGIN_PATH = "";

    /** 短信地址 */
    public static String SMS_URL = "";
    
    /** q提供的hessian接口*/
    public static String HESSIAN_Q = "";

    /** 系统首页3d广告XML文件路径*/
    public static String PATH_3D_XML = "";
    
    /** 职位搜索接口地址 */
    public static String POSTSEARCH_URL = "";
    
    static
    {
        HashMap<String, String> zone_service_config = new HashMap<String, String>();
        IDataSource sqlDataSource = DataSourceFactory.create(ServiceConstants.DS_8888889_IPC);

        Sql sql = (Sql) (sqlDataSource.getSelectCommands().get("getServiceConfl"));
        /** 设置数据库连接 */
        sql.setConnectionKey(ServiceConstants.DB_OLD_NAME);

        DataTable dt = DBManager.getDataTable(sql);
        for (int i = 0; i < dt.getRows().size(); i++)
        {
            zone_service_config.put(dt.getRow(i).getString("configName"), dt.getRow(i).getString("configValue"));
        }
        ACEONA10PATH = zone_service_config.get("Aceona1_0Domain");
        ACEONA20PATH = zone_service_config.get("Aceona2_0Domain");
        FILE_SERVER = zone_service_config.get("file_server");
        IPC_URL = zone_service_config.get("IPC_URL");
        HESSIAN_Q = zone_service_config.get("HESSIAN_Q");
        FEEDS_URL = zone_service_config.get("feeds_url");
        SEARCH_URL = zone_service_config.get("SEARCH_URL");
        POSTINFOSTATIC_URL = zone_service_config.get("postinfo_url");
        MANAGE_SYSTEM_LOGIN_PATH = ACEONA10PATH + "opmg";
        SMS_URL = zone_service_config.get("SMS_URL");
        PATH_3D_XML = zone_service_config.get("PATH_3D_XML");
        POSTSEARCH_URL = zone_service_config.get("postsearch_url");
        //SMS_URL = "http://192.168.2.148:8080/ipc/sms.do";//
    }

    public static final String DB_OLD_NAME = "aceona_old";

    public static final String DB_ZONE_NAME = "me1";

    public static final Long USER_CENTER_SQL_ID = 1L;

    /********** 数据库模块定义分隔线 start by Eric 20100330 *****************/

    public static final long DS_8888889_IPC = 8888889;

    /** 简历搜索 */
    public static final String DS_RESUMESEARCH = "resumesearch";

    public static final String DS_RECOMMEND = "recommend";

    public static final String DS_FRIEND = "friend";

    public static final String DS_REMARK = "remark";

    public static final String DS_TENPAY_ACT = "tenpay_act";

    public static final String DS_USER_ACTIVATE = "user_activate";
    
    public static final String DS_HXGD = "hxgd";
    
    /**快速登录*/
    public static final String DS_QUICKSIGNON = "quicksignon";
    
    //2011/3/22 职位热度评价功能 add by yujj begin -->
    public static final String DS_POST_DEGREE = "post_degree";
    //2011/3/22 职位热度评价功能 add by yujj end<--
    
    /********** 数据库模块定义分隔线 End by Eric 20100330 *****************/

}
